import { request } from '@/utils'
import { AxiosPromise } from 'axios'


export type UserInfo = {
        birthday: string
        gender: number
        id: string
        mobile: string
        name: string
        photo: string
    
}

function login(mobile: string, code: string) {
    return request({
        url: '/authorizations',
        method: 'post',
        data: { mobile, code }
    })
}
function userInfo(): AxiosPromise<{  data:UserInfo }> {
    return request({
        url: '/user/profile',

    })
}
export { login, userInfo }